home *** CD-ROM | disk | FTP | other *** search
Wrap
package org.spruce.midp.driver; import java.io.IOException; import javax.microedition.lcdui.Canvas; import javax.microedition.lcdui.Display; import javax.microedition.lcdui.Font; import javax.microedition.lcdui.Graphics; import javax.microedition.lcdui.Image; import org.spruce.midp.common.c; // $FF: renamed from: org.spruce.midp.driver.c final class class_0 extends Canvas implements Runnable { // $FF: renamed from: a boolean private boolean field_0; // $FF: renamed from: b boolean private boolean field_1; // $FF: renamed from: c int private static final int field_2 = 0; // $FF: renamed from: d int private static final int field_3 = 4210752; // $FF: renamed from: e int private static final int field_4 = 8421504; // $FF: renamed from: f int private static final int field_5 = 16777215; // $FF: renamed from: g int private int field_6; // $FF: renamed from: h int private int field_7; // $FF: renamed from: i int private int field_8; // $FF: renamed from: j int private int field_9; // $FF: renamed from: k int private int field_10; // $FF: renamed from: l int private int field_11; // $FF: renamed from: m int private int field_12; // $FF: renamed from: n int private int field_13; // $FF: renamed from: o int private int field_14; // $FF: renamed from: p int private int field_15; // $FF: renamed from: q javax.microedition.lcdui.Image private Image field_16; // $FF: renamed from: r boolean private boolean field_17; // $FF: renamed from: s javax.microedition.lcdui.Image private Image field_18; // $FF: renamed from: t javax.microedition.lcdui.Image private Image field_19; // $FF: renamed from: u javax.microedition.lcdui.Image[] private Image[] field_20; // $FF: renamed from: v javax.microedition.lcdui.Image private Image field_21; // $FF: renamed from: w javax.microedition.lcdui.Image private Image field_22; // $FF: renamed from: x javax.microedition.lcdui.Image private Image field_23; // $FF: renamed from: y javax.microedition.lcdui.Image private Image field_24; // $FF: renamed from: z javax.microedition.lcdui.Image private Image field_25; // $FF: renamed from: A int private int field_26; // $FF: renamed from: B int private int field_27; // $FF: renamed from: C int private int field_28; // $FF: renamed from: D int private int field_29; // $FF: renamed from: E javax.microedition.lcdui.Font private Font field_30; // $FF: renamed from: F org.spruce.midp.driver.b private b field_31; // $FF: renamed from: G java.lang.Thread private Thread field_32; // $FF: renamed from: H int private int field_33; // $FF: renamed from: I int private int field_34; // $FF: renamed from: J boolean private boolean field_35; // $FF: renamed from: K boolean private boolean field_36; // $FF: renamed from: L int[] private static final int[] field_37 = new int[]{100, 91, 83, 71, 67, 63, 59, 56, 53, 50, 48, 45, 43, 42}; public class_0(Display var1) { boolean var16; int var10001; label293: { label296: { var16 = Driver.p; super(); this.field_17 = false; this.field_30 = Font.getFont(64, 0, 8); this.field_16 = Image.createImage(((Canvas)this).getWidth(), ((Canvas)this).getHeight()); var10001 = var1.isColor(); if (!var16) { if (var10001 != 0) { break label296; } var10001 = var1.numColors(); } if (var16) { break label293; } if (var10001 <= 2) { var10001 = 1; break label293; } } var10001 = 0; } this.field_0 = (boolean)var10001; var10001 = var1.numColors(); if (!var16) { var10001 = var10001 <= 4 ? 1 : 0; } label297: { this.field_1 = (boolean)var10001; boolean var10000 = this.field_0; if (!var16) { if (var10000) { this.field_6 = 16777215; this.field_7 = 16777215; this.field_8 = 0; this.field_9 = 0; this.field_10 = 16777215; this.field_11 = 16777215; this.field_12 = 0; this.field_13 = 16777215; this.field_14 = 16777215; this.field_15 = 4210752; if (!var16) { break label297; } c.i = !c.i; } var10000 = this.field_1; } if (!var16) { if (var10000) { this.field_6 = 16777215; this.field_7 = 8421504; this.field_8 = 8421504; this.field_9 = 0; this.field_10 = 4210752; this.field_11 = 8421504; this.field_12 = 4210752; this.field_13 = 8421504; this.field_14 = 8421504; this.field_15 = 4210752; if (!var16) { break label297; } } var10000 = var1.isColor(); } if (var10000) { this.field_6 = 12632256; this.field_7 = 3199024; this.field_8 = 16777215; this.field_9 = 8339263; this.field_10 = 65535; this.field_11 = 16744192; this.field_12 = 16711680; this.field_13 = 16776960; this.field_14 = 16777215; this.field_15 = 16776960; if (!var16) { break label297; } } this.field_6 = 12632256; this.field_7 = 8750469; this.field_8 = 16777215; this.field_9 = 4144959; this.field_10 = 6316128; this.field_11 = 16777215; this.field_12 = 6316128; this.field_13 = 14737632; this.field_14 = 16777215; this.field_15 = 13684944; } label262: { class_0 var34; label299: { byte var2; byte var3; label260: { var2 = 12; var3 = 30; int var33 = ((Canvas)this).getHeight(); var10001 = 80; if (!var16) { if (var33 <= 80) { var2 = 8; var3 = 18; if (!var16) { break label260; } } var34 = this; if (var16) { break label299; } var33 = ((Canvas)this).getHeight(); var10001 = 60; } if (var33 <= var10001) { var2 = 4; var3 = 10; } } this.field_31 = new b(var2, var3); this.field_20 = new Image[this.field_31.g]; try { var34 = this; } catch (IOException var19) { var10001 = 0; break label262; } } try { var34.field_25 = Image.createImage(method_8("\u0011\u000bFRD]\u001d\u0018P_Y")); } catch (IOException var18) { var10001 = 0; } } this.field_26 = ((Canvas)this).getWidth() - this.field_25.getWidth(); this.field_27 = ((Canvas)this).getHeight(); this.field_28 = 1 * this.field_27 / 2; int var4 = this.field_26 - this.field_28; int var35 = var4; var10001 = 2; if (!var16) { if (var4 < 2) { var4 = 2; this.field_28 = this.field_26 - var4; } this.field_29 = var4 / 2; var35 = 2 * this.field_28; var10001 = this.field_31.h; } int var5 = var35 / var10001; int var6 = 4 * var5 / 3; a.a(method_8("]\u0019D\u007fY\u0004X") + var6); a.a(method_8("]\u0019D\u007fF\u0004X") + var5); a.a(method_8("L\u0017WDnIB\u0016") + this.field_28); a.a(method_8("Y\nWSBa\u000f\f\u0000") + var4); if (!var16) { if (var4 <= 0) { throw new Error(method_8("P\u0011S\u0000DZ\u0019ZO\u0011M\u0011S\u0000AL\u0002SSZ_\u0014YWP]XAY\\W\u0019DOF\u001e\u0002\u0016PCQ\bYRRT\u0011\u0018\u000e\u001f")); } this.field_18 = this.method_0(this.field_12, 8323072, var5, var6); this.field_24 = this.method_0(this.field_13, 8355584, var5, var6); this.field_19 = Image.createImage(this.field_26, this.field_27); } label241: { Graphics var7; label240: { label239: { var7 = this.field_19.getGraphics(); var35 = this.field_0; if (!var16) { if (var35) { break label239; } var35 = this.field_1; } if (!var35) { break label240; } } try { Image var8; int var9; int var10; label227: { var8 = Image.createImage(method_8("\u0011\u0015QRPM\u000b\u0018P_Y")); var9 = var8.getWidth(); var10 = var8.getHeight(); int var11 = 0; if (var16) { var35 = 0; } else if (var11 >= this.field_26) { var35 = this.field_0; if (!var16) { break label227; } } else { var35 = 0; } label226: while(true) { int var12 = var35; if (var16) { var7.drawImage(var8, var11, var12, 20); var12 += var10; } while(true) { while(var12 < this.field_27) { var7.drawImage(var8, var11, var12, 20); var12 += var10; } var35 = var11 + var9; if (!var16) { var11 = var35; if (var11 >= this.field_26) { var35 = this.field_0; if (!var16) { break label226; } } else { var35 = 0; } break; } var12 = var35; } } } label316: { if (!var16) { if (var35 == 0) { break label316; } var8 = Image.createImage(method_8("\u0011\u0019EPY_\u0014B\u000eAP\u001f")); var9 = var8.getWidth(); var10 = var8.getHeight(); var35 = this.field_28; } Image var30 = Image.createImage(var35, this.field_27); Graphics var13 = var30.getGraphics(); int var14 = 0; if (var16 || var14 < this.field_28) { label182: while(true) { int var15 = 0; if (var16) { var13.drawImage(var8, var14, var15, 20); var15 += var10; } while(true) { while(var15 < this.field_27) { var13.drawImage(var8, var14, var15, 20); var15 += var10; } var35 = var14 + var9; if (!var16) { var14 = var35; if (var14 >= this.field_28) { break label182; } break; } var15 = var35; } } } var7.drawImage(var30, this.field_29, 0, 20); if (!var16) { break label241; } } var7.setColor(this.field_6); var7.fillRect(this.field_29, 0, this.field_28, this.field_27); break label241; } catch (IOException var17) { if (!var16) { break label241; } } } var7.setColor(this.field_7); var7.fillRect(0, 0, this.field_26, this.field_27); var7.setColor(this.field_6); var7.fillRect(this.field_29, 0, this.field_28, this.field_27); } label125: { label309: { var35 = this.field_28; if (!var16) { if (var35 >= 45) { break label309; } var35 = this.field_0; } if (var16) { break label125; } if (var35 != 0) { var35 = 1; break label125; } } var35 = 2; } int var25 = var35; int var26 = 0; Graphics var20; int var27; if (var16) { this.field_20[var26] = Image.createImage(var25, this.field_27); var20 = this.field_20[var26].getGraphics(); var20.setColor(this.field_6); var20.fillRect(0, 0, var25, this.field_27); var20.setColor(this.field_8); var27 = -((Canvas)this).getHeight(); if (var16) { } } else if (var26 >= this.field_20.length) { var27 = 3 * var5 / 4; this.field_21 = Image.createImage(var27, var27); Graphics var21 = this.field_21.getGraphics(); var21.setColor(this.field_6); var21.fillRect(0, 0, var27, var27); var21.setColor(this.field_9); var21.fillArc(0, 0, var27, var27, 0, 360); int var28 = 3 * var5 / 4; this.field_22 = Image.createImage(var28, var28); Graphics var22 = this.field_22.getGraphics(); var22.setColor(this.field_6); var22.fillRect(0, 0, var28, var28); var22.setColor(this.field_10); var22.fillArc(0, 3, 6, 6, 0, 360); var22.fillArc(3, 4, 5, 5, 0, 360); var22.fillArc(4, 1, 5, 5, 0, 360); int var31 = 3 * var5 / 4; this.field_23 = Image.createImage(var31, var31); var20 = this.field_23.getGraphics(); var20.setColor(this.field_6); var20.fillRect(0, 0, var31, var31); var20.setColor(this.field_11); var20.fillArc(0, 0, var31, var31, 0, 360); var20.setColor(0); var20.drawLine(3, 2, 3, 7); var20.drawLine(3, 2, 6, 2); var20.drawLine(3, 4, 5, 4); this.method_1(); if (!var16) { return; } } else { this.field_20[var26] = Image.createImage(var25, this.field_27); var20 = this.field_20[var26].getGraphics(); var20.setColor(this.field_6); var20.fillRect(0, 0, var25, this.field_27); var20.setColor(this.field_8); var27 = -((Canvas)this).getHeight(); if (var16) { } } while(true) { while(var27 < ((Canvas)this).getHeight()) { var20.fillRect(0, var27 + var26 * this.field_27 / this.field_31.g, var25, this.field_31.g / 3); var27 += this.field_31.g / 2; } ++var26; if (var26 >= this.field_20.length) { var27 = 3 * var5 / 4; this.field_21 = Image.createImage(var27, var27); Graphics var23 = this.field_21.getGraphics(); var23.setColor(this.field_6); var23.fillRect(0, 0, var27, var27); var23.setColor(this.field_9); var23.fillArc(0, 0, var27, var27, 0, 360); int var29 = 3 * var5 / 4; this.field_22 = Image.createImage(var29, var29); Graphics var24 = this.field_22.getGraphics(); var24.setColor(this.field_6); var24.fillRect(0, 0, var29, var29); var24.setColor(this.field_10); var24.fillArc(0, 3, 6, 6, 0, 360); var24.fillArc(3, 4, 5, 5, 0, 360); var24.fillArc(4, 1, 5, 5, 0, 360); int var32 = 3 * var5 / 4; this.field_23 = Image.createImage(var32, var32); var20 = this.field_23.getGraphics(); var20.setColor(this.field_6); var20.fillRect(0, 0, var32, var32); var20.setColor(this.field_11); var20.fillArc(0, 0, var32, var32, 0, 360); var20.setColor(0); var20.drawLine(3, 2, 3, 7); var20.drawLine(3, 2, 6, 2); var20.drawLine(3, 4, 5, 4); this.method_1(); if (!var16) { return; } } else { this.field_20[var26] = Image.createImage(var25, this.field_27); var20 = this.field_20[var26].getGraphics(); var20.setColor(this.field_6); var20.fillRect(0, 0, var25, this.field_27); var20.setColor(this.field_8); var27 = -((Canvas)this).getHeight(); if (var16) { } } } } // $FF: renamed from: a (int, int, int, int) javax.microedition.lcdui.Image private Image method_0(int var1, int var2, int var3, int var4) { Image var5 = Image.createImage(var3, var4); Graphics var6 = var5.getGraphics(); int var7 = Math.max(var3 / 5, 1); var6.setColor(var1); var6.fillRect(0, 0, var3, var4); var6.setColor(this.field_6); var6.fillRect(0, 0, var7, var7); var6.fillRect(var3 - var7, 0, var7, var7); var6.setColor(this.field_14); var6.fillRect(var7, 0, var7, var7); var6.fillRect(var3 - 2 * var7, 0, var7, var7); var6.setColor(0); var6.fillRect(2 * var7, 2 * var7, var3 - 4 * var7, 2 * var7); var6.fillRect(var7, 3 * var7, var7, 4 * var7); var6.fillRect(var3 - 2 * var7, 3 * var7, var7, 4 * var7); var6.setColor(var2); var6.fillRect(2 * var7, var4 - 2 * var7, var3 - 4 * var7, var7); return var5; } public void paint(Graphics var1) { if (this.field_17) { var1.drawImage(this.field_16, 0, 0, 20); this.field_17 = false; } } // $FF: renamed from: a () void private void method_1() { boolean var14 = Driver.p; Graphics var1 = this.field_16.getGraphics(); var1.drawImage(this.field_19, 0, 0, 20); var1.drawImage(this.field_20[this.field_33], this.field_26 / 2, 0, 17); int[] var4 = this.field_31.i(); int[] var5 = this.field_31.j(); int var6 = 0; if (var14 || var6 < var5.length) { do { Image var7; label102: { var7 = null; int var10000 = var4[var6]; byte var10001 = 1; if (!var14) { if (var10000 == 1) { var7 = this.field_21; break label102; } var10000 = var4[var6]; var10001 = 2; if (var14) { if (var10000 == 2) { var7 = this.field_23; } break label102; } } if (var10000 == var10001) { var7 = this.field_22; } else if (var4[var6] == -1) { var7 = this.field_23; } } if (var7 != null) { int var2 = this.method_3(var5[var6]) + this.field_29; var1.drawImage(var7, this.method_3(var5[var6]), this.method_4(var6), 3); } ++var6; } while(var6 < var5.length); } int[] var16 = this.field_31.k(); int var8 = 0; if (var14) { if (var16[var8] >= -this.field_31.g) { this.method_2(var1, this.field_24, var16[var8], var8); ++var8; } else { ++var8; } } while(true) { while(var8 < var16.length) { if (var16[var8] >= -this.field_31.g) { this.method_2(var1, this.field_24, var16[var8], var8); ++var8; } else { ++var8; } } this.method_2(var1, this.field_18, this.field_31.g(), this.field_31.h()); int var9 = 0; class_0 var17 = this; if (!var14) { label149: { if (!var14) { if (this.field_25 != null) { var1.drawImage(this.field_25, ((Canvas)this).getWidth(), ((Canvas)this).getHeight(), 40); var9 = this.field_25.getHeight(); } var1.setColor(16777215); var1.fillRect(this.field_26, 0, ((Canvas)this).getWidth() - this.field_26, ((Canvas)this).getHeight() - var9); var1.setColor(8323072); var1.setFont(this.field_30); var1.drawString(String.valueOf(this.field_31.l()), ((Canvas)this).getWidth(), 0, 24); var1.setColor(this.field_15); var1.drawLine(0, ((Canvas)this).getHeight(), 0, ((Canvas)this).getHeight() - ((Canvas)this).getHeight() * this.field_31.m() / 700); var17 = this; if (var14) { break label149; } } if (var17.field_34 != 0) { String var10; label52: { if (this.field_34 == 1) { var10 = method_8("q\rB\u0000^XXPUTR"); if (!var14) { break label52; } } var10 = method_8("|9xg\u0010"); } Font var11 = Font.getFont(64, 1, 8); var1.setFont(var11); int var15 = this.field_26 / 2; int var3 = ((Canvas)this).getHeight() / 2; var1.setColor(16777215); int var12 = -1; if (!var14 && var12 > 1) { var1.setColor(16711680); var1.drawString(var10, var15, var3, 65); var1.drawString(method_8("y\u0019[E\u0011q\u000eSR"), var15, var3, 17); } else { do { int var13 = -1; if (var14 || var13 <= 1) { do { var1.drawString(var10, var15 + var12, var3 + var13, 65); var1.drawString(method_8("y\u0019[E\u0011q\u000eSR"), var15 + var12, var3 + var13, 17); ++var13; } while(var13 <= 1); } ++var12; } while(var12 <= 1); var1.setColor(16711680); var1.drawString(var10, var15, var3, 65); var1.drawString(method_8("y\u0019[E\u0011q\u000eSR"), var15, var3, 17); } } var17 = this; } var17.field_17 = true; return; } this.method_2(var1, this.field_24, var16[var8], var8); ++var8; } } // $FF: renamed from: a (javax.microedition.lcdui.Graphics, javax.microedition.lcdui.Image, int, int) void private void method_2(Graphics var1, Image var2, int var3, int var4) { int var5 = this.method_3(var3); int var6 = this.method_4(var4); var1.drawImage(var2, var5, var6, 3); } // $FF: renamed from: a (int) int private int method_3(int var1) { var1 = var1 * this.field_28 / this.field_31.h; var1 += this.field_29 + (this.field_28 / this.field_31.h >> 1); return var1; } // $FF: renamed from: b (int) int private int method_4(int var1) { var1 = var1 * this.field_27 / this.field_31.g; var1 += this.field_27 / this.field_31.g >> 1; return var1; } public void keyPressed(int var1) { boolean var2; label68: { label63: { label62: { class_0 var3; label61: { label69: { var2 = Driver.p; var10000 = this.field_35; if (!var2) { if (var10000 != 0) { return; } var10000 = this.field_34; if (var2) { break label69; } } if (var10000 != 0) { return; } var3 = this; if (var2) { break label61; } var10000 = ((Canvas)this).getGameAction(var1); } switch (var10000) { case 1: break label63; case 2: this.field_31.a(); this.method_1(); var3 = this; break; case 3: case 4: default: return; case 5: break label62; case 6: break label68; } } ((Canvas)var3).repaint(); if (!var2) { return; } } this.field_31.b(); this.method_1(); ((Canvas)this).repaint(); if (!var2) { return; } } class_0 var4 = this; if (!var2) { if (!this.field_31.c()) { return; } this.method_1(); var4 = this; } ((Canvas)var4).repaint(); if (!var2) { return; } } class_0 var5 = this; if (!var2) { if (!this.field_31.d()) { return; } this.method_1(); var5 = this; } ((Canvas)var5).repaint(); } public void keyRepeated(int var1) { this.keyPressed(var1); } public void run() { // $FF: Couldn't be decompiled } // $FF: renamed from: b () void public void method_5() { this.field_35 = false; this.field_32 = new Thread(this); this.field_32.start(); } // $FF: renamed from: a (boolean) void public void method_6(boolean var1) { this.field_35 = var1; } // $FF: renamed from: c () void public void method_7() { this.field_36 = true; } // $FF: renamed from: a (java.lang.String) java.lang.String private static String method_8(String var0) { char[] var1 = var0.toCharArray(); int var2 = var1.length; int var3 = 0; char[] var10000; int var10001; if (var2 <= 1) { var10000 = var1; var10001 = var3; } else { if (var3 >= var2) { return new String(var1); } var10000 = var1; var10001 = var3; } while(true) { char var10002 = var10000[var10001]; byte var10003; switch (var3 % 5) { case 0: var10003 = 62; break; case 1: var10003 = 120; break; case 2: var10003 = 54; break; case 3: var10003 = 32; break; default: var10003 = 49; } var10000[var10001] = (char)(var10002 ^ var10003); ++var3; if (var2 == 0) { var10000 = var1; var10001 = var2; } else { if (var3 >= var2) { return new String(var1); } var10000 = var1; var10001 = var3; } } } }